package com.example.module_member

import android.util.Log
import com.alibaba.android.arouter.facade.annotation.Route
import com.example.module_member.databinding.ActivityMemberBinding
import com.example.module_member.viewmodel.MemberViewModel
import com.yuwei.base.BaseActivity
import com.yuwei.common.path.RouterPath
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
@Route(path = RouterPath.YK_MODULE)
class MemberActivity : BaseActivity<ActivityMemberBinding,MemberViewModel>(){
    override fun initView() {
        vm.MemberManage(117)
        binding.ivBack.setOnClickListener { finish() }
    }

    override fun initData() {
        vm.getMemberSuccess.observe(this){
            binding.vip.text = it.membershipLevel
            binding.ri.text = it.registrationDate+" 到期"
        }
    }
}